home *** CD-ROM | disk | FTP | other *** search
Text File | 1986-12-08 | 1.2 KB | 35 lines | [TEXT/JEFF] |
- 00 NOOP THIS PROGRAM CREATE IN THE DATA STACK THE FIRST N
- 01 NOOP FIBONACCI NUMBERS IN THE UPWARD ORDER. TO GET A
- 02 NOOP NEW FIBONACCI NUMBER YOU ADD UP THE LAST TWO YOU
- 03 NOOP GOT AND THE FIRST TWO FIBONACCI NUMBERS ARE 1.
- 04 NOOP --------------------------------------------------
- 05 ILIT 2 ADDRESS 0 STORES THE OFFSET FOR THE # NEXT TO THE LAST
- 06 ILIT 13 N = 15----STORES THE # OF NUMBERS NEEDED TO GET
- 07 ILIT 1
- 08 ILIT 1 PUSH THE FIRST TWO FILSONACCI NUMBERS
- 09 NOOP ----------------------------------------
- 10 LOAD 0 1
- 11 ILIT 0
- 12 LSEQ TEST WHETHER THE CONTENT OF ADDRESS 1 IS <= 0
- 13 BRTR 32
- 14 NOOP ----------------------------------
- 15 DUPL DUPLICATE THE LAST ONE
- 16 LOAD 0 0
- 17 REF 0 0
- 18 ADD PRODUCE THE ADDRESS OF THE ONE NEXT TO THE LAST
- 19 ILOD
- 20 ADD PRODUCE A NEW FILSONACCI NUMBER
- 22 NOOP ------------------------------------
- 22 LOAD 0 0
- 23 ILIT 1
- 24 ADD UPDATE THE OFFSET
- 25 STOR 0 0
- 26 NOOP ------------------------------------
- 27 LOAD 0 1
- 28 ILIT 1
- 29 SUB UPDATE ADDRESS 1
- 30 STOR 0 1
- 31 BUNC 10 -------------------------------------
- 32 STOP
- DUMP
-